package com.foogui.utils;

import java.util.concurrent.TimeUnit;

public interface ILock {
    /**
     * 尝试获取锁
     * @param lockName 锁名
     * @param duration 持锁时间
     * @param timeUnit 单位
     * @return
     */
    boolean tryLock(String lockName,Long duration, TimeUnit timeUnit);

    boolean unlock(String lockName);
}
